/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package PackageInstaller.Config;

import java.io.File;
import java.io.Serializable;

/**
 *
 * @author wcss
 */
public class PackageInstallerConfig implements Serializable {

    private String packageName;
    private String packageVersion;
    private String titleText;
    private String licenseFile;
    private String[][] packageDepends;
    private String finishScriptFile;
    private String removeScriptFile;
    private String homepage;
    private String manager;
    private String owner;
    private String welcome;
    private String topFlag;
    private String[][] params;
    private String logoImage;

    public static PackageInstallerConfig load(String path) throws Exception {
        if (new File(path).exists()) {
            return (PackageInstallerConfig) ObjectToXMLUtil.loadObjectFromXml(path);
        } else {
            return null;
        }
    }

    public static void save(PackageInstallerConfig entry, String path) throws Exception {
        ObjectToXMLUtil.saveObjectToXml(entry, path);
    }

    public PackageInstallerConfig() {
    }

    /**
     * @return the packageName
     */
    public String getPackageName() {
        return packageName;
    }

    /**
     * @param packageName the packageName to set
     */
    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    /**
     * @return the packageVersion
     */
    public String getPackageVersion() {
        return packageVersion;
    }

    /**
     * @param packageVersion the packageVersion to set
     */
    public void setPackageVersion(String packageVersion) {
        this.packageVersion = packageVersion;
    }

    /**
     * @return the titleText
     */
    public String getTitleText() {
        return titleText;
    }

    /**
     * @param titleText the titleText to set
     */
    public void setTitleText(String titleText) {
        this.titleText = titleText;
    }

    /**
     * @return the licenseFile
     */
    public String getLicenseFile() {
        return licenseFile;
    }

    /**
     * @param licenseFile the licenseFile to set
     */
    public void setLicenseFile(String licenseFile) {
        this.licenseFile = licenseFile;
    }

    /**
     * @return the finishScriptFile
     */
    public String getFinishScriptFile() {
        return finishScriptFile;
    }

    /**
     * @param finishScriptFile the finishScriptFile to set
     */
    public void setFinishScriptFile(String finishScriptFile) {
        this.finishScriptFile = finishScriptFile;
    }

    /**
     * @return the removeScriptFile
     */
    public String getRemoveScriptFile() {
        return removeScriptFile;
    }

    /**
     * @param removeScriptFile the removeScriptFile to set
     */
    public void setRemoveScriptFile(String removeScriptFile) {
        this.removeScriptFile = removeScriptFile;
    }

    /**
     * @return the homepage
     */
    public String getHomepage() {
        return homepage;
    }

    /**
     * @param homepage the homepage to set
     */
    public void setHomepage(String homepage) {
        this.homepage = homepage;
    }

    /**
     * @return the manager
     */
    public String getManager() {
        return manager;
    }

    /**
     * @param manager the manager to set
     */
    public void setManager(String manager) {
        this.manager = manager;
    }

    /**
     * @return the owner
     */
    public String getOwner() {
        return owner;
    }

    /**
     * @param owner the owner to set
     */
    public void setOwner(String owner) {
        this.owner = owner;
    }

    /**
     * @return the welcome
     */
    public String getWelcome() {
        return welcome;
    }

    /**
     * @param welcome the welcome to set
     */
    public void setWelcome(String welcome) {
        this.welcome = welcome;
    }

    /**
     * @return the topFlag
     */
    public String getTopFlag() {
        return topFlag;
    }

    /**
     * @param topFlag the topFlag to set
     */
    public void setTopFlag(String topFlag) {
        this.topFlag = topFlag;
    }

    /**
     * @return the packageDepends
     */
    public String[][] getPackageDepends() {
        return packageDepends;
    }

    /**
     * @param packageDepends the packageDepends to set
     */
    public void setPackageDepends(String[][] packageDepends) {
        this.packageDepends = packageDepends;
    }

    /**
     * @return the params
     */
    public String[][] getParams() {
        return params;
    }

    /**
     * @param params the params to set
     */
    public void setParams(String[][] params) {
        this.params = params;
    }

    /**
     * @return the logoImage
     */
    public String getLogoImage() {
        return logoImage;
    }

    /**
     * @param logoImage the logoImage to set
     */
    public void setLogoImage(String logoImage) {
        this.logoImage = logoImage;
    }
}
